package com.rimi.lzhg.controller;

import com.rimi.lzhg.entry.Comment;
import com.rimi.lzhg.service.CommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class CommentController {

    @Autowired
    private CommentService commentService;

    @ApiOperation(value = "添加评论",notes = "添加评论信息")
    @PostMapping("/comment")
    public Object saveComment(Comment comment){
        return commentService.saveComment(comment);
    }
}
